﻿using aier.business.logic;
using aier.dataaccess.model;
using aier.dataaccess.dapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace aier.wx.api.selfhost.Controllers
{
    //[Authorize]
    [RoutePrefix("api/Hospital")]
    public class HospitalController: ApiController
    {
        public HospitalBll hospitalBll { get; set; }

        /// <summary>
        /// 获取所有医院信息
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public IHttpActionResult Get()
        {
            List<HospitalView> hospitalModels =  hospitalBll.GetAllHospital();

            return Ok<List<HospitalView>>(hospitalModels);
        }

    }
   
}
